<!DOCTYPE html>
<html>
<head>
<!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

<!-- 可选的 Bootstrap 主题文件（一般不用引入） -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">

<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
	<title><!-- Tp5简易留言板 --></title>
</head>
<body>
<div class="container">
<h2><a href="{:url('show')}">留言展示 - Tp5简易留言板</a></h2>

<div class="panel panel-default">
	<div class="panel-heading">
		<h3 class="panel-title">{$list.0.title}</h3> 
	</div>
	<div class="panel-body"> 
	{$list.0.content|default="这家伙很懒，什么也没留下"}
	</div>
	<!-- List group -->
	<ul class="list-group">
		<li class="list-group-item">{$list.0.create_time}</li>
	</ul>
</div>

	<!-- <div class="panel panel-default">
		<div class="panel-body">
		<p class="text-center"><strong>{$list.0.title}</strong></p>
		<p class="text-center">{$list.0.create_time}</p>
		{$list.0.content|default="这家伙很懒，什么也没留下"}
		</div>
	</div> -->
	
<!-- 	<nav aria-label="...">
	  <ul class="pager">
	    <li class="previous"><a href="{$next}"><span aria-hidden="true">&larr;</span> 上一页</a></li>
	    <li class="next"><a href="{$up}">下一页 <span aria-hidden="true">&rarr;</span></a></li>
	  </ul>
	</nav>

	<nav aria-label="...">
	  <ul class="pager">
	    <li class="previous disabled"><a href="{$up}"><span aria-hidden="true">&larr;</span> Older</a></li>
	    <li class="next"><a href="{$next}">Newer <span aria-hidden="true">&rarr;</span></a></li>
	  </ul>
	</nav> -->


	<nav aria-label="...">
		<ul class="pager">
			<!-- 上一页 -->
			{if condition="$next neq '' "}
				<li class="previous"><a href="{$next}"><span aria-hidden="true">&larr;</span>上一页</a></li>
				{else /}
				<li class="previous disabled"><span aria-hidden="true">&larr;没有了</span></li>
				{/if}
			<!-- 下一页 -->
			{if condition="$up neq '' "}
				<li class="next"><a href="{$up}">下一页<span aria-hidden="true">&rarr;</span></a></li>
			{else /}
				<li class="next disabled"><span aria-hidden="true">没有了&rarr;</span></li>
			{/if}
			 
		</ul>
	</nav>
</div>

<div id="logos">
<button onclick="changess()">点击</button>
  <img src="" class="qrcode" alt="二维码展示"/>

</div>

<script type="text/javascript" src="/tp5/jquery.js"></script>
<script type="text/javascript">
function changess()
  {
     var logos = document.getElementById ('logos');
    $.ajax({
             type: "GET",
             url: "8",
             data: '',
             dataType: "json",
             success: function(r){
                        if (r.8==200) { //console.log(r); 
                        var path = 'data:image/png;base64,'+r.data; //给img的sec赋值。
                        console.log(path);
                         $("#logos").html("<img src="+path+">");
                        
                         logos.html("<img src="+path+">");
                         console.log( logos.html("<img src="+path+">"));
                       }else{
                            alert(r.err); 
                          }
                      }
         });
  }
</script>

</body>
</html>